Watch Pane
After you test a script, the Script Editor's Watch Pane will list tokens and variables in the script that are “watched” and their values. This pane is helpful when debugging your script. Each time you test your script, an instance of its watched items is saved.
To open the Watch Pane
- Select the Watch tab at the bottom of the Script Editor. Alternatively, select View from the main menu and select Watch Window, or use the keyboard shortcut CTRL+W.
To watch a variable in your script
Note: Tokens are automatically watched in your script when you get or set a token's value in your script.
- Call the DesignTools.Watch method in your script with the variable name and the variable itself as parameters.
- Run the Script.
To see values from a specific time the script ran
- Next to Show watch from, use the drop-down menu to select a time and date your script ran.
To see a history of a watched item's values
- Select an item in the watched items list.
- Click the View History button at the top of the Watch Pane.
- The History dialog box will show the value and type of variable or token each time it was watched.
- Optional: Select Show changes only in the History dialog box, to list only the times when the value changed, instead of every time the value was watched.
- Click OK to close the dialog box.
Note: If this button is disabled, the watched item only had one value.
Example: A variable that is watched three times in the script will have three values listed in the History dialog box.
To delete the list of watched items
- Click the red X at the top of the Watch Pane.
- All lists of watched items will be deleted, not just the list selected in the Show watch from drop-down menu. Note that this action is irreversible.